package com.ihisomp.mapper;

import com.ihisomp.dto.SysPathTreeDto;
import com.ihisomp.entity.OrgRolePage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 * 角色与页面关系 Mapper 接口
 * </p>
 *
 * @author zy
 * @since 2022-04-12
 */
public interface OrgRolePageMapper extends BaseMapper<OrgRolePage> {

    /**
     * 根据角色代码删除角色对应程序
     *
     * @param roleKey
     * @return
     */
    int deleteByRoleKey(String roleKey);

    /**
     * 根据角色代码查询角色对应程序
     *
     * @param roleKey
     * @return
     */
    List<SysPathTreeDto> getPageByRoleKey(String roleKey);
}
